package org.cladwell.domain;

import lombok.Data;


public class JsonResponce <T>{
    private String code;
    private String msg;
    private T data;

    public JsonResponce(T data) {
        this.data = data;
        msg="成功";
        code="0";
    }

    public JsonResponce(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
    public static JsonResponce<String> success(String s){
        return new JsonResponce<>(s);
    }
}
